<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DesignPattern: Singleton Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="DesignPattern.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">DesignPattern
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a> &#124;
<a href="class_singleton-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Singleton Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8h_source.html">DESIGNPATTERN_Singleton.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Singleton:</div>
<div class="dyncontent">
<div class="center"><img src="class_singleton__coll__graph.png" border="0" usemap="#_singleton_coll__map" alt="Collaboration graph"/></div>
<map name="_singleton_coll__map" id="_singleton_coll__map">
<area shape="rect" title=" " alt="" coords="5,5,109,156"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a543d81b5f1458e51fe1a56082b6afccc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_singleton.html#a543d81b5f1458e51fe1a56082b6afccc">~Singleton</a> ()</td></tr>
<tr class="separator:a543d81b5f1458e51fe1a56082b6afccc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a01073bb7481d82d783309be8ba3f51ba"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_singleton.html">Singleton</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_singleton.html#a01073bb7481d82d783309be8ba3f51ba">Instance</a> ()</td></tr>
<tr class="separator:a01073bb7481d82d783309be8ba3f51ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a162d66724c6eac1ab293989c5c72f8df"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="_my_self_def_8h.html#a7927e087749615dae3114cc27b91c86d">VOID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_singleton.html#a162d66724c6eac1ab293989c5c72f8df">Destroy</a> ()</td></tr>
<tr class="separator:a162d66724c6eac1ab293989c5c72f8df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a0e21dfc9afab45b0a6a70f6665ce5819"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_singleton.html#a0e21dfc9afab45b0a6a70f6665ce5819">Singleton</a> ()</td></tr>
<tr class="separator:a0e21dfc9afab45b0a6a70f6665ce5819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43e9f43fde95b9db67be60e3281b4c46"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_singleton.html#a43e9f43fde95b9db67be60e3281b4c46">Singleton</a> (const <a class="el" href="class_singleton.html">Singleton</a> &amp;cSingleton)</td></tr>
<tr class="separator:a43e9f43fde95b9db67be60e3281b4c46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a694a4e4fd7d31bcc3aacc1d439fe3dc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_singleton.html">Singleton</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_singleton.html#a694a4e4fd7d31bcc3aacc1d439fe3dc5">operator=</a> (const <a class="el" href="class_singleton.html">Singleton</a> &amp;cSingleton)</td></tr>
<tr class="separator:a694a4e4fd7d31bcc3aacc1d439fe3dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr class="memitem:a4b6cbfb98cff93721671b349098102bc"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_singleton.html">Singleton</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_singleton.html#a4b6cbfb98cff93721671b349098102bc">m_pInstance</a> = NULL</td></tr>
<tr class="separator:a4b6cbfb98cff93721671b349098102bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8h_source.html#l00011">11</a> of file <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8h_source.html">DESIGNPATTERN_Singleton.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a543d81b5f1458e51fe1a56082b6afccc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a543d81b5f1458e51fe1a56082b6afccc">&#9670;&nbsp;</a></span>~Singleton()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Singleton::~Singleton </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destruction</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VOID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

<p class="definition">Definition at line <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html#l00033">33</a> of file <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html">DESIGNPATTERN_Singleton.cpp</a>.</p>

</div>
</div>
<a id="a0e21dfc9afab45b0a6a70f6665ce5819"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e21dfc9afab45b0a6a70f6665ce5819">&#9670;&nbsp;</a></span>Singleton() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Singleton::Singleton </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construction</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VOID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

<p class="definition">Definition at line <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html#l00022">22</a> of file <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html">DESIGNPATTERN_Singleton.cpp</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_singleton_a0e21dfc9afab45b0a6a70f6665ce5819_icgraph.png" border="0" usemap="#class_singleton_a0e21dfc9afab45b0a6a70f6665ce5819_icgraph" alt=""/></div>
<map name="class_singleton_a0e21dfc9afab45b0a6a70f6665ce5819_icgraph" id="class_singleton_a0e21dfc9afab45b0a6a70f6665ce5819_icgraph">
<area shape="rect" title=" " alt="" coords="296,5,435,32"/>
<area shape="rect" href="class_singleton.html#a01073bb7481d82d783309be8ba3f51ba" title=" " alt="" coords="115,5,248,32"/>
<area shape="rect" href="_design_pattern_8cpp.html#a353674c5af92be7fb389265cde4e5e03" title=" " alt="" coords="5,5,67,32"/>
</map>
</div>

</div>
</div>
<a id="a43e9f43fde95b9db67be60e3281b4c46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43e9f43fde95b9db67be60e3281b4c46">&#9670;&nbsp;</a></span>Singleton() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Singleton::Singleton </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_singleton.html">Singleton</a> &amp;&#160;</td>
          <td class="paramname"><em>cSingleton</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Copy Construction</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td><a class="el" href="class_singleton.html">Singleton</a>&amp; cSingleton </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a162d66724c6eac1ab293989c5c72f8df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a162d66724c6eac1ab293989c5c72f8df">&#9670;&nbsp;</a></span>Destroy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_my_self_def_8h.html#a7927e087749615dae3114cc27b91c86d">VOID</a> Singleton::Destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destroy</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VOID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
<dl class="section note"><dt>Note</dt><dd>singleton </dd></dl>

<p class="definition">Definition at line <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html#l00064">64</a> of file <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html">DESIGNPATTERN_Singleton.cpp</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_singleton_a162d66724c6eac1ab293989c5c72f8df_icgraph.png" border="0" usemap="#class_singleton_a162d66724c6eac1ab293989c5c72f8df_icgraph" alt=""/></div>
<map name="class_singleton_a162d66724c6eac1ab293989c5c72f8df_icgraph" id="class_singleton_a162d66724c6eac1ab293989c5c72f8df_icgraph">
<area shape="rect" title=" " alt="" coords="115,5,244,32"/>
<area shape="rect" href="_design_pattern_8cpp.html#a353674c5af92be7fb389265cde4e5e03" title=" " alt="" coords="5,5,67,32"/>
</map>
</div>

</div>
</div>
<a id="a01073bb7481d82d783309be8ba3f51ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01073bb7481d82d783309be8ba3f51ba">&#9670;&nbsp;</a></span>Instance()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_singleton.html">Singleton</a> * Singleton::Instance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Instance</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VOID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Singleton* </dd></dl>
<dl class="section note"><dt>Note</dt><dd>singleton</dd></dl>
<p>Instance</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VOID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Singleton* </dd></dl>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="class_singleton.html">Singleton</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html#l00046">46</a> of file <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html">DESIGNPATTERN_Singleton.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_singleton_a01073bb7481d82d783309be8ba3f51ba_cgraph.png" border="0" usemap="#class_singleton_a01073bb7481d82d783309be8ba3f51ba_cgraph" alt=""/></div>
<map name="class_singleton_a01073bb7481d82d783309be8ba3f51ba_cgraph" id="class_singleton_a01073bb7481d82d783309be8ba3f51ba_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,139,32"/>
<area shape="rect" href="class_singleton.html#a0e21dfc9afab45b0a6a70f6665ce5819" title=" " alt="" coords="187,5,325,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_singleton_a01073bb7481d82d783309be8ba3f51ba_icgraph.png" border="0" usemap="#class_singleton_a01073bb7481d82d783309be8ba3f51ba_icgraph" alt=""/></div>
<map name="class_singleton_a01073bb7481d82d783309be8ba3f51ba_icgraph" id="class_singleton_a01073bb7481d82d783309be8ba3f51ba_icgraph">
<area shape="rect" title=" " alt="" coords="115,5,248,32"/>
<area shape="rect" href="_design_pattern_8cpp.html#a353674c5af92be7fb389265cde4e5e03" title=" " alt="" coords="5,5,67,32"/>
</map>
</div>

</div>
</div>
<a id="a694a4e4fd7d31bcc3aacc1d439fe3dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a694a4e4fd7d31bcc3aacc1d439fe3dc5">&#9670;&nbsp;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_singleton.html">Singleton</a>&amp; Singleton::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_singleton.html">Singleton</a> &amp;&#160;</td>
          <td class="paramname"><em>cSingleton</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assignment</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td><a class="el" href="class_singleton.html">Singleton</a>&amp; cSingleton </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_singleton.html">Singleton</a>&amp; </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a4b6cbfb98cff93721671b349098102bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b6cbfb98cff93721671b349098102bc">&#9670;&nbsp;</a></span>m_pInstance</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_singleton.html">Singleton</a> * Singleton::m_pInstance = NULL</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8h_source.html#l00068">68</a> of file <a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8h_source.html">DESIGNPATTERN_Singleton.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>C:/96_project/DesignPattern/01_Singleton/groupinc/<a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8h_source.html">DESIGNPATTERN_Singleton.h</a></li>
<li>C:/96_project/DesignPattern/01_Singleton/<a class="el" href="_d_e_s_i_g_n_p_a_t_t_e_r_n___singleton_8cpp_source.html">DESIGNPATTERN_Singleton.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
